import request from '@/utils/request'
// 添加到购物车
// 对购物车中的内容进行修改
export const reqAddToShopCart = (skuId, skuNum) => {
  return request({
    method: 'POST',
    url: `/cart/addToCart/${skuId}/${skuNum}`,
  })
}
// 获取购物车列表
export const reqShopCartList = () => {
  return request({
    method: 'GET',
    url: '/cart/cartList',
  })
}
// 切换商品选中状态
export const reqSetListIsChecked = (skuId, isChecked) => {
  return request({
    method: 'GET',
    url: `/cart/checkCart/${skuId}/${isChecked}`,
  })
}
// 删除商品
export const reqDeleteCart = (skuId) => {
  return request({
    method: 'DELETE',
    url: `/cart/deleteCart/${skuId}`,
  })
}
